import { Color } from '@script/index';

export default class Checker {
  private readonly scale: number;
  reflectiveness: number;

  constructor(scale, reflectiveness?) {
    this.scale = scale;
    this.reflectiveness = reflectiveness;
  }

  sample(ray, position, normal?): Color {
    return Math.abs((Math.floor(position.x * 0.1) + Math.floor(position.z * this.scale)) % 2) < 1 ?
      Color.black : Color.white;
  }
}